package java8_13;

import java.util.Arrays;

/**
 * @author oldliu
 * @since 1.0
 */
public class ArraySort {
    public static void main(String[] args) {
        int ar[]={40,-4,59,30,134,84,6,20,23};
        int a2[]={4,5,6,7};
        //判断Ar,a2是否相同
       boolean xiangtong=true;
       if(ar.length==a2.length){
           for(int i=0;i<ar.length;i++){
               if(ar[i]!=a2[i])
               {
                   xiangtong=false;
                   break;
               }
           }
       }else{
           xiangtong=false;
       }

        String str=Arrays.toString(ar);
        System.out.println(str);
        System.out.println(Arrays.equals(ar,a2));

        Arrays.sort(ar);
        System.out.println("排序后：");
        System.out.println(Arrays.toString(ar));
    }
}
